home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-17 / czcm11b.zip / COMMTEST.BAT < prev    next >
DOS Batch File  |  1990-12-09  |  3KB  |  94 lines

  1. @ECHO OFF
  2. C:
  3. cd\utl
  4. if not exist pf.com goto :error
  5. cls
  6. echo ***********************************************************
  7. echo ***  You can use Port Finder in a batch file to deter-  ***
  8. echo ***  mine the number of COM ports that are installed in ***
  9. echo ***  any IBM compatible computer.  Press any key now to ***
  10. echo ***  see how many COM ports your computer has.......... ***
  11. echo ***********************************************************
  12. echo  
  13. pause
  14. cls
  15. pf %1 %2 >nul
  16. echo ***********************************************************
  17. if errorlevel 15 goto 15port
  18. if errorlevel 14 goto 14port
  19. if errorlevel 13 goto 13port
  20. if errorlevel 12 goto 12port
  21. if errorlevel 11 goto 11port
  22. if errorlevel 10 goto 10port
  23. if errorlevel 9 goto 9port
  24. if errorlevel 8 goto 8port
  25. if errorlevel 7 goto 7port
  26. if errorlevel 6 goto 6port
  27. if errorlevel 5 goto 5port
  28. if errorlevel 4 goto 4port
  29. if errorlevel 3 goto 3port
  30. if errorlevel 2 goto 2port
  31. if errorlevel 1 goto 1port
  32. if errorlevel 0 goto 0port
  33. :0port
  34. echo ************* You have no COM ports! **********************
  35. goto endall
  36. :1port
  37. echo ************* You have COM port 1 *************************
  38. goto endall
  39. :2port
  40. echo ************* You have COM port 2 *************************
  41. goto endall
  42. :3port
  43. echo ************* You have COM ports 1 and 2 ******************
  44. goto endall
  45. :4port
  46. echo ************* You have COM port 3 *************************
  47. goto endall
  48. :5port
  49. echo ************* You have COM ports 1 and 3 ******************
  50. goto endall
  51. :6port
  52. echo ************* You have COM ports 2 and 3 ******************
  53. goto endall
  54. :7port
  55. echo ************* You have COM ports 1, 2, and 3 **************
  56. goto endall
  57. :8port
  58. echo ************* You have COM port 4 *************************
  59. goto endall
  60. :9port
  61. echo ************* You have COM ports 1 and 4 ******************
  62. goto endall
  63. :10port
  64. echo ************* You have COM ports 2 and 4 ******************
  65. goto endall
  66. :11port
  67. echo ************* You have COM ports 1, 2, and 4 **************
  68. goto endall
  69. :12port
  70. echo ************* You have COM ports 3 and 4 ******************
  71. goto endall
  72. :13port
  73. echo ************* You have COM ports 1, 3, and 4 **************
  74. goto endall
  75. :14port
  76. echo ************* You have COM ports 2, 3, and 4 **************
  77. goto endall
  78. :15port
  79. echo ************* You have COM ports 1, 2, 3, and 4 ***********
  80. :endall
  81. echo ***********************************************************
  82. goto :end
  83. :error
  84. cls
  85. echo  
  86. echo ***********************************************************
  87. echo ** The file PF.COM must be in the same default directory **
  88. echo ** as COMMTEST.BAT.  Please have these two files in the  **
  89. echo ** same default directory before running COMMTEST.BAT.   **
  90. echo ***********************************************************
  91. echo  
  92. :end
  93. cd\
  94. echo on